/*     */ package com.jcrj.action.team;
/*     */ 
/*     */ import com.jcrj.action.BaseAction;
/*     */ import com.jcrj.entity.OPoliceReport;
/*     */ import com.jcrj.entity.OPoliceTeam;
/*     */ import com.jcrj.entity.OPoliceTeamDraft;
/*     */ import com.jcrj.entity.OTeamHistory;
/*     */ import com.jcrj.entity.OTeamUser;
/*     */ import com.jcrj.entity.OUser;
/*     */ import com.jcrj.service.PoliceTeamService;
/*     */ import com.jcrj.service.SysLogService;
/*     */ import java.io.IOException;
/*     */ import java.io.PrintWriter;
/*     */ import java.util.Date;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import javax.servlet.http.HttpServletResponse;
/*     */ 
/*     */ public class PoliceTeamAction extends BaseAction
/*     */ {
/*     */   private PoliceTeamService policeTeamService;
/*     */   private List<OTeamUser> policeList;
/*     */   private List<OTeamHistory> historyList;
/*     */   private List<OPoliceReport> reportList;
/*     */   private List<OPoliceTeam> teamList;
/*     */   private long pageCount;
/*     */   private long totalCount;
/*     */   private String users;
/*     */   private String names;
/*     */   private int policeId;
/*     */   private String status;
/*     */   private OPoliceTeam policeTeam;
/*     */   private String[] ids;
/*     */   private String content;
/*     */   private SysLogService sysLogService;
/*     */   private List userList;
/*     */   private OPoliceTeamDraft teamDraft;
/*     */   private List<OPoliceTeamDraft> draftList;
/*     */   private OTeamUser team;
/*     */ 
/*     */   public String policeTeamInit()
/*     */   {
/*  41 */     return "success";
/*     */   }
/*     */ 
/*     */   public String selectPoeple()
/*     */   {
/*  46 */     return "success";
/*     */   }
/*     */ 
/*     */   public String draftPoliceTeamList() {
/*  50 */     OUser user = (OUser)super.getSession().get("userInfo");
/*  51 */     this.totalCount = this.policeTeamService.draftPoliceTeamCount(super.getTitle(), super.getStartDate(), super.getEndDate(), super.getCurrentPage(), user);
/*  52 */     this.pageCount = ((this.totalCount - 1L) / 10L + 1L);
/*  53 */     if (super.getCurrentPage() > this.pageCount) {
/*  54 */       super.setCurrentPage(Long.valueOf(this.pageCount).intValue());
/*     */     }
/*  56 */     this.draftList = this.policeTeamService.draftPoliceTeamList(super.getTitle(), super.getStartDate(), super.getEndDate(), super.getCurrentPage(), user);
/*  57 */     return "success";
/*     */   }
/*     */ 
/*     */   public String inPoliceTeamList() {
/*  61 */     OUser user = (OUser)super.getSession().get("userInfo");
/*  62 */     this.totalCount = this.policeTeamService.inPoliceTeamCount(super.getTitle(), super.getStartDate(), super.getEndDate(), super.getCurrentPage(), user);
/*  63 */     this.pageCount = ((this.totalCount - 1L) / 10L + 1L);
/*  64 */     if (super.getCurrentPage() > this.pageCount) {
/*  65 */       super.setCurrentPage(Long.valueOf(this.pageCount).intValue());
/*     */     }
/*  67 */     this.teamList = this.policeTeamService.inPoliceTeamList(super.getTitle(), super.getStartDate(), super.getEndDate(), super.getCurrentPage(), user);
/*  68 */     for (OPoliceTeam team : this.teamList) {
/*  69 */       team.setActorName(this.policeTeamService.getActorName(team.getId().intValue()));
/*     */     }
/*  71 */     return "success";
/*     */   }
/*     */ 
/*     */   public String savePoliceTeam() {
/*     */     try {
/*  76 */       OUser user = (OUser)super.getSession().get("userInfo");
/*  77 */       this.teamDraft.setCreateTime(new Date());
/*  78 */       this.teamDraft.setUserId(user.getId());
/*  79 */       this.teamDraft.setUserName(user.getName());
/*  80 */       this.policeTeamService.savePoliceTeamDraft(this.teamDraft);
/*  81 */       super.getResponse().getWriter().write("success");
/*  82 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/*  84 */       e.printStackTrace();
/*     */       try
/*     */       {
/*  87 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/*  89 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/*  87 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/*  89 */         e.printStackTrace();
/*     */       }
/*     */     }
/*  92 */     return null;
/*     */   }
/*     */ 
/*     */   public String updatePoliceTeam() {
/*     */     try {
/*  97 */       OUser user = (OUser)super.getSession().get("userInfo");
/*  98 */       this.teamDraft.setUserId(user.getId());
/*  99 */       this.teamDraft.setUserName(user.getName());
/* 100 */       this.policeTeamService.updatePoliceTeamDraft(this.teamDraft);
/* 101 */       super.getResponse().getWriter().write("success");
/* 102 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 104 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 107 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 109 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 107 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 109 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 112 */     return null;
/*     */   }
/*     */ 
/*     */   public String policeTeamDarftInfo() {
/* 116 */     this.teamDraft = this.policeTeamService.policeTeamDraft(this.policeId);
/* 117 */     return "success";
/*     */   }
/*     */ 
/*     */   public String deletePoliceTeamDraft() {
/*     */     try {
/* 122 */       this.policeTeamService.deletePoliceTeamDraft(this.ids);
/* 123 */       super.getResponse().getWriter().write("success");
/* 124 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 126 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 129 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 131 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 129 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 131 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 134 */     return null;
/*     */   }
/*     */ 
/*     */   public String saveSubmitNext() {
/*     */     try {
/* 139 */       OUser user = (OUser)super.getSession().get("userInfo");
/* 140 */       this.policeTeam = new OPoliceTeam();
/* 141 */       this.policeTeam.setCreateTime(new Date());
/* 142 */       this.policeTeam.setUserId(user.getId());
/* 143 */       this.policeTeam.setUserName(user.getName());
/* 144 */       this.policeTeam.setTitle(this.teamDraft.getTitle());
/* 145 */       this.policeTeam.setContent(this.teamDraft.getContent());
/* 146 */       this.policeTeam.setFileId(this.teamDraft.getFileId());
/* 147 */       this.policeTeam.setDel("0");
/* 148 */       this.policeTeamService.saveSubmitNext(this.policeTeam, this.teamDraft.getActorId(), this.teamDraft.getActorName(), this.status);
/* 149 */       this.sysLogService.saveLog("警种协作", user.getName(), "提交了" + this.policeTeam.getTitle() + "的协作信息");
/* 150 */       super.getResponse().getWriter().write("success");
/* 151 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 153 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 156 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 158 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 156 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 158 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 161 */     return null;
/*     */   }
/*     */ 
/*     */   public String updateSubmitNext()
/*     */   {
/*     */     try {
/* 167 */       OUser user = (OUser)super.getSession().get("userInfo");
/* 168 */       this.policeTeam = new OPoliceTeam();
/* 169 */       this.policeTeam.setCreateTime(new Date());
/* 170 */       this.policeTeam.setUserId(user.getId());
/* 171 */       this.policeTeam.setUserName(user.getName());
/* 172 */       this.policeTeam.setTitle(this.teamDraft.getTitle());
/* 173 */       this.policeTeam.setContent(this.teamDraft.getContent());
/* 174 */       this.policeTeam.setFileId(this.teamDraft.getFileId());
/* 175 */       this.policeTeam.setDel("0");
/* 176 */       this.policeTeamService.saveSubmitNext(this.policeTeam, this.teamDraft.getActorId(), this.teamDraft.getActorName(), this.status);
/* 177 */       this.sysLogService.saveLog("警种协作", user.getName(), "提交了" + this.policeTeam.getTitle() + "的协作信息");
/* 178 */       super.getResponse().getWriter().write("success");
/* 179 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 181 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 184 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 186 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 184 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 186 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 189 */     return null;
/*     */   }
/*     */ 
/*     */   public String subimtNext() {
/*     */     try {
/* 194 */       OUser user = (OUser)super.getSession().get("userInfo");
/* 195 */       OPoliceTeam police = this.policeTeamService.getPoliceTeamObj(this.policeTeam.getId().intValue());
/* 196 */       police.setFileId(this.policeTeam.getFileId());
/* 197 */       this.policeTeamService.saveNextSubmit(police, this.users, this.names, user, this.content, this.team.getId().intValue(), this.status);
/* 198 */       this.sysLogService.saveLog("警种协作", user.getName(), "提交了" + police.getTitle() + "的协作信息");
/* 199 */       super.getResponse().getWriter().write("success");
/* 200 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 202 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 205 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 207 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 205 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 207 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 210 */     return null;
/*     */   }
/*     */ 
/*     */   public String submitDaftNext() {
/*     */     try {
/* 215 */       OUser user = (OUser)super.getSession().get("userInfo");
/* 216 */       OPoliceTeam police = this.policeTeamService.getPoliceTeamObj(this.policeTeam.getId().intValue());
/* 217 */       police.setFileId(this.policeTeam.getFileId());
/* 218 */       this.policeTeamService.saveDaftNextSubmit(police, this.users, this.names, user, this.content, this.team.getId().intValue(), this.status);
/* 219 */       this.sysLogService.saveLog("警种协作", user.getName(), "提交了" + police.getTitle() + "的协作信息");
/* 220 */       super.getResponse().getWriter().write("success");
/* 221 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 223 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 226 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 228 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 226 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 228 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 231 */     return null;
/*     */   }
/*     */ 
/*     */   public String completeTeam() {
/*     */     try {
/* 236 */       OUser user = (OUser)super.getSession().get("userInfo");
/* 237 */       OPoliceTeam police = this.policeTeamService.getPoliceTeamObj(this.policeId);
/* 238 */       police.setFileId(this.policeTeam.getFileId());
/* 239 */       this.policeTeamService.updateCompleteTeam(police, user, this.content, this.team.getId().intValue());
/* 240 */       this.sysLogService.saveLog("警种协作", user.getName(), "结束了" + police.getTitle() + "的协作信息");
/* 241 */       super.getResponse().getWriter().write("success");
/* 242 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 244 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 247 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 249 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 247 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 249 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 252 */     return null;
/*     */   }
/*     */ 
/*     */   public String draftAllComplete() {
/*     */     try {
/* 257 */       OUser user = (OUser)super.getSession().get("userInfo");
/* 258 */       OPoliceTeam police = this.policeTeamService.getPoliceTeamObj(this.policeId);
/* 259 */       this.policeTeamService.updateAllCompleteTeam(this.team.getId().intValue(), user);
/* 260 */       this.sysLogService.saveLog("警种协作", user.getName(), "结束了" + police.getTitle() + "的协作信息");
/* 261 */       super.getResponse().getWriter().write("success");
/* 262 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 264 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 267 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 269 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 267 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 269 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 272 */     return null;
/*     */   }
/*     */ 
/*     */   public String getPoliceTeamObj()
/*     */   {
/* 277 */     this.policeTeam = this.policeTeamService.getPoliceTeamObj(this.policeId);
/* 278 */     this.historyList = this.policeTeamService.findTeamHistoryList(this.policeId);
/* 279 */     this.reportList = this.policeTeamService.findReportList(this.policeId);
/* 280 */     return this.status;
/*     */   }
/*     */ 
/*     */   public String getTaskTeamObj() {
/* 284 */     this.team = this.policeTeamService.getTeamUser(this.policeId);
/* 285 */     this.historyList = this.policeTeamService.findTeamHistoryList(this.team.getPoliceTeam().getId().intValue());
/* 286 */     this.reportList = this.policeTeamService.findReportList(this.team.getPoliceTeam().getId().intValue());
/* 287 */     return this.status;
/*     */   }
/*     */ 
/*     */   public String taskPoliceTeamList()
/*     */   {
/*     */     try {
/* 293 */       OUser user = (OUser)super.getSession().get("userInfo");
/* 294 */       String agent = this.sysLogService.getAgentUser(user);
/* 295 */       this.totalCount = this.policeTeamService.taskPoliceTeamCount(super.getTitle(), super.getStartDate(), super.getEndDate(), agent);
/* 296 */       this.pageCount = ((this.totalCount - 1L) / 10L + 1L);
/* 297 */       if (super.getCurrentPage() > this.pageCount) {
/* 298 */         super.setCurrentPage(Long.valueOf(this.pageCount).intValue());
/*     */       }
/* 300 */       this.policeList = this.policeTeamService.taskPoliceTeamList(super.getTitle(), super.getStartDate(), super.getEndDate(), super.getCurrentPage(), agent);
/*     */     } catch (Exception e) {
/* 302 */       e.printStackTrace();
/*     */     }
/* 304 */     return "success";
/*     */   }
/*     */ 
/*     */   public String completePoliceTeam() {
/* 308 */     OUser user = (OUser)super.getSession().get("userInfo");
/* 309 */     this.totalCount = this.policeTeamService.completePoliceTeamCount(super.getTitle(), super.getStartDate(), super.getEndDate(), super.getCurrentPage(), user);
/* 310 */     this.pageCount = ((this.totalCount - 1L) / 10L + 1L);
/* 311 */     if (super.getCurrentPage() > this.pageCount) {
/* 312 */       super.setCurrentPage(Long.valueOf(this.pageCount).intValue());
/*     */     }
/* 314 */     this.policeList = this.policeTeamService.completePoliceTeamList(super.getTitle(), super.getStartDate(), super.getEndDate(), super.getCurrentPage(), user);
/* 315 */     return "success";
/*     */   }
/*     */ 
/*     */   public String deletePoliceTeam() {
/*     */     try {
/* 320 */       this.policeTeamService.deletePoliceTeam(this.ids);
/* 321 */       super.getResponse().getWriter().write("success");
/* 322 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 324 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 327 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 329 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 327 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 329 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 332 */     return null;
/*     */   }
/*     */ 
/*     */   public PoliceTeamService getPoliceTeamService() {
/* 336 */     return this.policeTeamService;
/*     */   }
/*     */   public void setPoliceTeamService(PoliceTeamService policeTeamService) {
/* 339 */     this.policeTeamService = policeTeamService;
/*     */   }
/*     */ 
/*     */   public List<OTeamUser> getPoliceList() {
/* 343 */     return this.policeList;
/*     */   }
/*     */ 
/*     */   public void setPoliceList(List<OTeamUser> policeList) {
/* 347 */     this.policeList = policeList;
/*     */   }
/*     */ 
/*     */   public long getPageCount() {
/* 351 */     return this.pageCount;
/*     */   }
/*     */   public void setPageCount(long pageCount) {
/* 354 */     this.pageCount = pageCount;
/*     */   }
/*     */   public long getTotalCount() {
/* 357 */     return this.totalCount;
/*     */   }
/*     */   public void setTotalCount(long totalCount) {
/* 360 */     this.totalCount = totalCount;
/*     */   }
/*     */   public String getUsers() {
/* 363 */     return this.users;
/*     */   }
/*     */   public void setUsers(String users) {
/* 366 */     this.users = users;
/*     */   }
/*     */   public String getNames() {
/* 369 */     return this.names;
/*     */   }
/*     */   public void setNames(String names) {
/* 372 */     this.names = names;
/*     */   }
/*     */   public int getPoliceId() {
/* 375 */     return this.policeId;
/*     */   }
/*     */   public void setPoliceId(int policeId) {
/* 378 */     this.policeId = policeId;
/*     */   }
/*     */   public String getStatus() {
/* 381 */     return this.status;
/*     */   }
/*     */   public void setStatus(String status) {
/* 384 */     this.status = status;
/*     */   }
/*     */   public OPoliceTeam getPoliceTeam() {
/* 387 */     return this.policeTeam;
/*     */   }
/*     */   public void setPoliceTeam(OPoliceTeam policeTeam) {
/* 390 */     this.policeTeam = policeTeam;
/*     */   }
/*     */   public String[] getIds() {
/* 393 */     return this.ids;
/*     */   }
/*     */   public void setIds(String[] ids) {
/* 396 */     this.ids = ids;
/*     */   }
/*     */ 
/*     */   public List<OTeamHistory> getHistoryList() {
/* 400 */     return this.historyList;
/*     */   }
/*     */ 
/*     */   public void setHistoryList(List<OTeamHistory> historyList) {
/* 404 */     this.historyList = historyList;
/*     */   }
/*     */ 
/*     */   public List<OPoliceReport> getReportList() {
/* 408 */     return this.reportList;
/*     */   }
/*     */ 
/*     */   public void setReportList(List<OPoliceReport> reportList) {
/* 412 */     this.reportList = reportList;
/*     */   }
/*     */ 
/*     */   public String getContent() {
/* 416 */     return this.content;
/*     */   }
/*     */ 
/*     */   public void setContent(String content) {
/* 420 */     this.content = content;
/*     */   }
/*     */ 
/*     */   public List getUserList() {
/* 424 */     return this.userList;
/*     */   }
/*     */ 
/*     */   public void setUserList(List userList) {
/* 428 */     this.userList = userList;
/*     */   }
/*     */ 
/*     */   public SysLogService getSysLogService() {
/* 432 */     return this.sysLogService;
/*     */   }
/*     */ 
/*     */   public void setSysLogService(SysLogService sysLogService) {
/* 436 */     this.sysLogService = sysLogService;
/*     */   }
/*     */ 
/*     */   public OPoliceTeamDraft getTeamDraft() {
/* 440 */     return this.teamDraft;
/*     */   }
/*     */ 
/*     */   public void setTeamDraft(OPoliceTeamDraft teamDraft) {
/* 444 */     this.teamDraft = teamDraft;
/*     */   }
/*     */ 
/*     */   public List<OPoliceTeamDraft> getDraftList() {
/* 448 */     return this.draftList;
/*     */   }
/*     */ 
/*     */   public void setDraftList(List<OPoliceTeamDraft> draftList) {
/* 452 */     this.draftList = draftList;
/*     */   }
/*     */ 
/*     */   public List<OPoliceTeam> getTeamList() {
/* 456 */     return this.teamList;
/*     */   }
/*     */ 
/*     */   public void setTeamList(List<OPoliceTeam> teamList) {
/* 460 */     this.teamList = teamList;
/*     */   }
/*     */ 
/*     */   public OTeamUser getTeam() {
/* 464 */     return this.team;
/*     */   }
/*     */ 
/*     */   public void setTeam(OTeamUser team) {
/* 468 */     this.team = team;
/*     */   }
/*     */ }

/* Location:           /Volumes/work/oa/WEB-INF/classes/
 * Qualified Name:     com.jcrj.action.team.PoliceTeamAction
 * JD-Core Version:    0.6.0
 */